package com.hospital.common.core.exception;

import lombok.Data;

/**
 * @author lvyao
 * @description 异常处理类
 * @date 2021/3/30
 */
@Data
public class ExceptionHelp extends RuntimeException {
    private Integer code;
    private String message;

    public ExceptionHelp(ExceptionHelpEnum exceptionHelpEnum, String aftermsg) {
        this.code = exceptionHelpEnum.getCode();
        this.message = exceptionHelpEnum.getMessage() + aftermsg;
    }

    public ExceptionHelp(ExceptionHelpEnum exceptionHelpEnum) {
        this.code = exceptionHelpEnum.getCode();
        this.message = exceptionHelpEnum.getMessage();
    }
}
